# 列表
a = [1, 2, 3, 4, 5]
print(a)
print(a[:2])
print(a[:-1])

# 字典
me = {'height': 180}
me['weight'] = 70
print(me)


# 类
def __init__(self, name) -> None:
    self.name = name


def hello(self):
    print("Hello" + self.name + "!")


def goodbye(self):
    print("GoodBye" + self + "!")


class Man:
    def __init__(self, name):
        self.name = name

    def hello(self):
        print("Hello" + self.name + "!")

    def goodbye(self):
        print("GoodBye" + self.name + "!")

m = Man("David")
m.hello()
m.goodbye()
